package leetcode.code1894;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

/**
 * @author Max
 * @date 2021年9月10日
 * @description 每日一题 <br>
 *              https://leetcode-cn.com/problems/find-the-student-that-will-replace-the-chalk/<br>
 *              1894. 找到需要补充粉笔的学生编号 <br>
 */
public abstract class Solution1894 implements IDebug {

	public abstract int chalkReplacer(int[] chalk, int k);

	private void debug(String str1, int k, int expect) {
		int[] chalk = HelpDebug.str2array3(str1);
		int result = this.chalkReplacer(chalk, k);
		HelpDebug.compare(expect, result);
	}

	@Override
	public void debug1() {
		// 输入：chalk = [5,1,5], k = 22
		// 输出：0
		String str1 = "[5,1,5]";
		int k = 22;
		int expect = 0;
		this.debug(str1, k, expect);
	}

	@Override
	public void debug2() {
		// 输入：chalk = [3,4,1,2], k = 25
		// 输出：1
		String str1 = "[3,4,1,2]";
		int k = 25;
		int expect = 1;
		this.debug(str1, k, expect);
	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

}
